/**
 * Copyright (c) 2013 onionframework.org
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 */
package org.onionframework.servlet;

import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

import org.springframework.stereotype.Component;

/**
 * 在实现了Servlet接口的类上标注这个注解，即可注册为Servlet
 * 
 * @author allan
 *
 */
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Inherited
@Documented
@Component
public @interface OnionServlet {
	
	/**
	 * @return url匹配模式，例如/abc
	 */
	String[] urlPatterns();
	
	/**
	 * @return beanName
	 */
	String value() default "";
}
